import { RouteRecordRaw } from 'vue-router'

import Navbar from '../components/navbar/index.vue'
import Tabbar from '../components/tabbar/index.vue'


const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: '/home',
    },
    {
        path: '/home',
        components: {
            header: Navbar,
            default: () => import('../views/home/index.vue'),
            footer: Tabbar,
        },
        meta: {
            title: '首页',
            icon: 'home-o',
            inTabbar: true, // 要显示到 tabbar 上的标识
        }
    },
    {
        path: '/doctor',
        components: {
            default: () => import('../views/doctor/index.vue'),
            footer: Tabbar,
        },
        meta: {
            title: '问医',
            icon: 'shield-o',
            inTabbar: true, // 要显示到 tabbar 上的标识
            requireAuth:true,//需要登录才能访问的页面
        },
    },
    {//这是消息界面
        path: '/message',
        components: {
            default: () => import('../views/message/idnex.vue'),
            footer: Tabbar,
        },
        meta: {
            title: '消息',
            icon: 'user-circle-o',
            inTabbar: true, // 要显示到 tabbar 上的标识
            requireAuth:true,
        },
    },
    {//这是我的界面
        path: '/my',
        components: {
            default: () => import('../views/my/idnex.vue'),
            footer: Tabbar,

        },
        meta: {
            title: '我的',
            icon: 'user-circle-o',
            inTabbar: true, // 要显示到 tabbar 上的标识
            requireAuth:true,
        },
    },
    {//我的界面中的设置界面
        path: '/setting',
        components: {
            default: () => import('../views/setting/index.vue'),
        },
        meta: {
            title: '设置',
            requireAuth:true,
        },
    },
    {//我的界面中的疫苗预约界面
        path: '/appointment',
        components: {
            default: () => import('../views/appointment/index.vue'),
        },
        meta: {
            title: '疫苗预约',
            requireAuth:true,
        },
    },
    {
        path: '/login',
        component: () => import('../views/login/index.vue'),
        meta: {
            title: '用户登录'
        }
    },
    {
        path: '/chat',
        component: () => import('../views/chat/index.vue'),
        meta: {
            title: '聊天',
            requireAuth:true,
        }
    },
    {
        path: '/hpv',
        component: () => import('../views/hpv/index.vue'),
        meta: {
            title: '疫苗接种',
        }
    },
    {
        path: '/people',
        component: () => import('../views/people/index.vue'),
        meta: {
            title: '所有医生详情信息'
        }
    },
    {
        path: '/pharmacy',
        component: () => import('../views/pharmacy/index.vue'),
        meta: {
            title: '药品'
        }
    },
    {
        path: '/big',
        component: () => import('../views/big/index.vue'),
        meta: {
            title: '疫苗'
        }
    },
    {
        path: '/small',
        component: () => import('../views/small/index.vue'),
        meta: {
            title: '帮助'
        }
    },
    {
        path: '/empty',
        component: () => import('../views/empty/index.vue'),
        meta: {
            title: '活动'
        }
    },
    {
        path: '/personal',
        component: () => import('../views/personal/index.vue'),
        meta: {
            title: '医生详情信息',
            requireAuth:true,
        }
    },
    {
        path: '/Search',
        component: () => import('../views/Search/index.vue'),
        meta: {
            title: '搜索',
            requireAuth:true,
        }
    },   {
        path: '/concern',
        component: () => import('../views/concern/index.vue'),
        meta: {
            title: '搜索'
        }
    }

]

export default routes